package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.StrategyDetail;
import cn.wolfcode.luowowo.common.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();
    List<StrategyDetail> selectForList(QueryObject qo);

    int updateByPrimaryKey(StrategyDetail record);

    void insertRelation(@Param("detailId") Long detailId, @Param("tagId") Long tagId);

    void deleteRelation(Long detailId);

    void changeState(@Param("id") Long id, @Param("state") Integer state);

    List<StrategyDetail> selectViewnumTop3(Long destId);

    void updateStats(StrategyDetail detail);
}